import VueRouter from 'vue-router'
//导入对应的路由组件
import HomeContainer from './components/tabber/HomeContainer.vue'
import MemberContainer from './components/tabber/MemberContainer.vue'
import ShopecarContainer from './components/tabber/ShopcarContainer.vue'
import SearchContainer from './components/tabber/SearchContainer.vue'
import Newslist from './components/news/Newlist.vue'
import Newsinfo from './components/news/Newsinfo.vue'
import Photolist from './components/photos/Photolist.vue'
import Photoinfo from './components/photos/Photoinfo.vue'
import Goodslist from './components/goods/Goodslist.vue'
import Goodsinfo from './components/goods/Goodsinfo.vue'
import GoodsDesc from './components/goods/GoodsDesc.vue'
import GoodsComment from './components/goods/GoodsComment.vue'
//路由
var router = new VueRouter({
  routes: [{
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    component: HomeContainer
  },
  {
    path: '/member',
    component: MemberContainer
  },
  {
    path: '/shopcar',
    component: ShopecarContainer
  },
  {
    path: '/search',
    component: SearchContainer
  },
  {
    path: '/home/newslist',
    component: Newslist
  },
  {
    path: '/home/newsinfo/:id',
    component: Newsinfo
  },
  {
    path: '/home/photolist',
    component: Photolist
  },
  {
    path: '/home/photoinfo/:id',
    component: Photoinfo
  },
  {
    path: '/home/goodslist',
    component: Goodslist
  },
  {
    path: '/home/goodsinfo/:id',
    component: Goodsinfo,
    name: 'goodsinfo',
  },
  { path: '/home/goodsdesc/:id', component: GoodsDesc, name: 'goodsdesc' },
  { path: '/home/goodscomment/:id', component: GoodsComment, name: 'goodscomment' }
  ],
  linkActiveClass: 'mui-active' //覆盖默认的路由高亮的类。默认的类叫做router-link-active

})

export default router